package ninja.awesome.game.gameobject;

import ninja.awesome.framework.Graphics;
import ninja.awesome.framework.Image;
import ninja.awesome.game.MainGameScreen;
import ninja.awesome.game.classes.Neutral;
import ninja.awesome.game.compat.Rectangle;
import ninja.awesome.game.main.Animation;
import ninja.awesome.game.main.Sprites;

public class PowerUp extends GameObj implements Neutral {

	private Image image[] = new Image[2];
	private int speed = 1;
	MainGameScreen game;
	Sprites s;
	Animation anim;

	public PowerUp(int x, int y, MainGameScreen game, Sprites s) {
		super(x, y);
		this.game = game;
		this.s = s;
		image[0] = s.getPowerUp();
		anim = new Animation(5, image[0], 32, 32, 1);
	}

	@Override
	public void update() {
		yLoc += speed;
		anim.runAnimation();
	}

	@Override
	public void draw(Graphics g) {
		anim.drawAnimation(g, xLoc, yLoc);
	}

	@Override
	public Rectangle getBounds() {
		return new Rectangle(xLoc, yLoc, 16, 16);
	}

	@Override
	public int getX() {
		return xLoc;
	}

	@Override
	public int getY() {
		return yLoc;
	}

}
